package com.mccree.service.impl;

import com.mccree.mapper.DepartmentMapper;
import com.mccree.pojo.Department;
import com.mccree.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {
    final DepartmentMapper departmentMapper;

    @Autowired
    public DepartmentServiceImpl(DepartmentMapper departmentMapper) {
        this.departmentMapper = departmentMapper;
    }

    @Override
    public List<Department> queryDeptList() {
        return departmentMapper.queryDeptList();
    }

    @Override
    public Department getDeptById(Integer id) {
        return departmentMapper.getDeptById(id);
    }
}
